<%@ page language="java" import="java.util.*,com.hs.core.utils.*,com.hs.core.cache.*" pageEncoding="utf-8"%>
<%
   String pageStr = (String)request.getAttribute("pagestr");
   List datalist = (List)request.getAttribute("datalist");
   String pagenum = (String)request.getAttribute("pagenum");
   String pagecount = (String)request.getAttribute("pagecount");
   
	
   int pagenumInt = Integer.parseInt(pagenum==null?"0":pagenum);
   int pagecountInt = Integer.parseInt(pagecount==null?"0":pagecount);
   String orderName = (String)request.getAttribute("orderName");
   String orderNum = (String)request.getAttribute("orderNum");  
   String datarange = (String)request.getAttribute("datarange");  
   
   String onesql = (String)request.getAttribute("onesql");
   String searchtype = (String)request.getAttribute("searchtype");//基本检索、高级检索
   String issecond = (String)request.getAttribute("issecond"); 
   String tags = (String)request.getAttribute("tags"); 
   String searchstrinfo = (String)request.getAttribute("searchstrinfo"); 
   String keyword = (String)request.getAttribute("keyword"); 
   String beforesql = (String)request.getAttribute("beforesql"); 
   String paramstr = (String)request.getAttribute("paramstr"); 
   String onekeyword = (String)request.getAttribute("onekeyword"); 
   String onesearchinfo = (String)request.getAttribute("onesearchinfo"); 
   
   
    
   //String displayintro = (String)request.getAttribute("displayintro");
   //String searchtype = (String)request.getAttribute("issecond"); 
   
   //out.println("searchtype:" + searchtype)
   
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<%@ include file="../../include.jsp"%> 
<script language=JavaScript>
var stype = <%=issecond%>;
if(stype !=null && stype !="" && stype!="0")
{
	var sbutton = window.parent.document.getElementById("secondsearch");
	sbutton.disabled=false;
}
//题录信息
function magaInfo(id)
{
	var pageURL = "<%=basePath %>data/magainfo.do?id=" + id;
	openwindow(pageURL,'800','600',''); 
}
//详细数据信息
 function auditInfo(id){
	var pageURL = "<%=basePath %>audit/auditlistFrame.do?id=" + id;
	openwindow(pageURL,'1000','800',''); 
    //window.location.href=pageURL;
 }
//排序
function orderPageLocal(cstr,orderNum){
 	  var conobj = window.parent.document.all.conditionurl;
	  if(conobj !=null && conobj !=undefined){
		  	var convalue = conobj.value;
		  	if(convalue.indexOf("?")!=-1 ){
		  		convalue +="&orderName="+cstr+"&orderNum="+orderNum;
		  	}else {
		  		convalue +="?orderName="+cstr+"&orderNum="+orderNum; 
		  	}
		  	window.parent.document.getElementById("bookframe").src = convalue;
	  } 
}
function exportResult(){
 	var checkObj =  document.all.checkmaga;
 	var magaid = "";
 	for(var i=0 ;i<checkObj.length; i++){
 		if(checkObj[i].checked){
 			magaid = magaid + checkObj[i].value + ",";
 		}
 	} 
 	if(magaid != ""){
 		var allsql = document.all.allsql.value;
 		document.exportform.action="<%=basePath%>search/exportMagaResult.do?magaid="+magaid+"&allsql="+ encodeURIComponent(allsql)+"&resulttype=1";	
  		document.exportform.submit();
 	}else{
 		alert("请选择要导出的数据!");
 	}
}
 
function exportAllResult(){
 	var allsql = document.all.allsql.value;
 	document.exportform.action="<%=basePath%>search/exportMagaResult.do?allsql="+ encodeURIComponent(allsql)+"&resulttype=2";	
  	document.exportform.submit();
 }
function viewresult(){


}
function changeDisplay(){
	var v = getRadioValue('displaytype');   
	window.parent.generalSearch(v,'');

}
function exportData()
{
    var papers = getSelectPaper();
    if('' == papers){
    	alert('请选择要导出的文献!');
    	return;
    }
	document.dataform.action="<%=basePath%>data/exportAllData.do?ids="+papers;	
  	document.dataform.submit();
}
function getSelectPaper(){
	var ids = document.getElementsByName("paperid");    
    var idstr = "";          
    for (var i = 0; i < ids.length; i++)               
    {                     
           if(ids[i].checked){
           	 idstr += ids[i].value+",";
           }            
    }     
    return idstr;
}
function filterResultBasic(datatype){
   
    var paramstr = searchform.paramstr.value;  
    var onestr =  "?datarange="+datatype+paramstr; 
    resultform.action = "<%=basePath %>search/dosearch.do"+onestr;
 	resultform.submit(); 
	//if(searchtype == 'basic_search'){
	    // alert(window.parent.searchinput.frameElement.src);
	    //parent.top.//.frames["searchinput"].generalSearch('',datatype);
	    
		//generalSearch('',datatype);
	//}else if(searchtype == 'advsearch'){
	  //  advSearch(datatype);
	//} 
}
function filterResult(datatype){
   
    var paramstr = searchform.paramstr.value;  
    var onestr =  "?datarange="+datatype;
    var strreplace = "datatype="+datatype;
    var sql = pageForm.searchSql.value;
    if("0" == datatype){
        var index = sql.indexOf("datatype=");
        var sqlone = sql.substr(0,index);
        var sqltwo = sql.substr(index+10,sql.length); 
    	sql = sqlone + " 1=1" + sqltwo;
    } else{
        var index = sql.indexOf("1=");
        var count = 3;
        if(index == -1){
	        index = sql.indexOf("datatype=");
	        count = 10;
        }
        var sqlone = sql.substr(0,index);
        var sqltwo = sql.substr(index+count,sql.length); 
        //alert(sqlone);
        //alert(sqltwo);
	    sql = sqlone + " datatype=" + datatype + sqltwo;
    }
    
    pageForm.searchSql.value = sql; 
    //alert(pageForm.searchSql.value);
    pageForm.action = "<%=basePath %>search/dosearch.do"+onestr;
 	pageForm.submit(); 
	//if(searchtype == 'basic_search'){
	    // alert(window.parent.searchinput.frameElement.src);
	    //parent.top.//.frames["searchinput"].generalSearch('',datatype);
	    
		//generalSearch('',datatype);
	//}else if(searchtype == 'advsearch'){
	  //  advSearch(datatype);
	//} 
}
function orderResult(colname,ordernum){
	var searchtype = document.getElementById('searchtype').value; 
	//var paramstr = searchform.paramstr.value; 
	pageForm.orderName.value = colname;
	pageForm.orderNum.value = ordernum;
	var sql = pageForm.searchSql.value;
	//a.title
	//a.bookname
	//a.bookcd
	//a.PERIODICALNAME
	//a.YEARSTR
	//alert(sql);
	var orderbystr = "";
	var index = sql.indexOf("order by");
	var sqlone = sql.substr(sql,index);
	if('1' == ordernum){
		orderbystr += ' order by ' + colname + " asc";
	}else{
		orderbystr += ' order by ' + colname + " desc";
	}
	sql = sqlone + orderbystr;
	//alert(sql);
	pageForm.searchSql.value = sql; 
    var onestr =  "?orderName="+colname+"&orderNum="+ordernum ;
    pageForm.action = "<%=basePath %>search/dosearch.do"+onestr;
 	pageForm.submit(); 
	/**
	if(searchtype == 'advmod'){ 
		advModSearch(colname,ordernum);
	}else if(searchtype == 'advbook'){
	    advBookSearch(colname,ordernum);
	}else if(searchtype == 'adveng'){
	    advEngSearch(colname,ordernum);
	}  
	*/
}
function getOneSql(){
	return document.getElementById('onesql').value;
    
}
function downloadpdf(pid){
	openwindow('<%=basePath%>data/downloadFile.do?pid='+pid,'0','0','');
}
$(document).ready(function(){
	$("#tipcontain").jTipsShow({
		delaytime:200,
		tipsTag: 'span',
		tipsTitle: 'title'
	}); 
});


<!--
		 
/**
简单检索
*/		
function generalSearch(display,condition){
	//var win = document.getElementById('resultlist').contentWindow;
	var datarange = condition;
    var tags = getAllselectedId(); 
    if(null != tags && tags != ''){
    	var tarray = tags.split(','); 
        if(tarray != null){
        	if(tarray.length > 1000){
        		alert("最多只能选择1000个主题分类词,请删减!");
        		return;	
        	}
        }
    }
	//var divid = "txt_";
	//var onestr = "";
	//var win = document.getElementById('resultlist').contentWindow;
 	var basiccol = document.getElementById("basic_col").value;
	var basicvalue = document.getElementById("basic_colvalue").value;
	var basicspecial = document.getElementById("basic_special").value;
	//alert(datarange);
	//if(isNull(basicvalue)){
	//	alert("检索条件不能为空!");
	//	document.getElementById("basic_colvalue").focus();
	//    return;
	//} 
	onestr = "?datarange="+datarange+"&tags="+tags+"&basiccol="+basiccol +"&basicvalue="+basicvalue+"&basicspecial="+basicspecial+"&searchtype=basic_search";
 	//parent..src="<%=basePath %>search/dosearch.do"+onestr;
 	//window.parent.searchresult.frameElement.src="<%=basePath %>search/dosearch.do"+onestr;
 	resultform.action = "<%=basePath %>search/dosearch.do"+onestr;
 	resultform.submit();
 	
 	//parent..src="<%=basePath %>search/dosearch.do"+onestr;
}	
//二次检索
function generalSecondSearch(condition){
	//var win = document.getElementById('resultlist').contentWindow;
	 
	var onesql = window.parent.searchresult.getOneSql();
	//alert(onesql);
	var divid = "txt_";
	var onestr = "";
	var basiccol = document.getElementById("basic_col").value;
	var basicvalue = document.getElementById("basic_colvalue").value;
	var basicspecial = document.getElementById("basic_special").value;;
	var onekeyword = document.getElementById("onekeyword").value;;
	/**if(isNull(basicvalue)){
		alert("检索条件不能为空!");
		document.getElementById("basic_colvalue").focus();
	    return;
	}*/
	onestr = "?basiccol="+basiccol +"&searchtype=basic_search&basicvalue="+basicvalue+"&basicspecial="+basicspecial+"&onekeyword="+onekeyword;
	if(onesql !=null && onesql!=""){
		onestr = onestr + "&onesql=" + encodeURIComponent(onesql);
	}
	 
	resultform.action = "<%=basePath %>search/dosearch.do"+onestr;
 	resultform.submit(); 
}
 
 
 /**
 	控制各个检索模块DIV的显示
 */
 function searchViewDisplay(divid){
 	 var div1 = document.getElementById(divid); 
 	 //var iframeobj = window.parent.searchresult.frameElement;
 	 
     if('basic_search' == divid){
         stype = "basic_search";
     	 if(div1.style != null){
     		 div1.style.display="";
     		 hidediv('advsearch');
	     	hidediv('advmod');
	     	hidediv('adveng');
	     	hidediv('advbook');
      		 //if(null != iframeobj)
     		 //	iframeobj.src = '<%=basePath%>/search/dosearch.do?searchtype=basic_search';
     	}else{
	     	hidediv('advsearch');
	     	hidediv('advmod');
	     	hidediv('adveng');
	     	hidediv('advbook');
     	}
     } else if('advsearch' == divid){
         stype = "advsearch";
     	 if(div1.style != null){
     		 div1.style.display="";
     		 hidediv('basic_search');
	     	hidediv('advmod');
	     	hidediv('adveng');
	     	hidediv('advbook');
     		 //if(null != iframeobj)
     		 //	iframeobj.src = '<%=basePath%>/search/dosearch.do?searchtype=advsearch';
     	}else{
	     	hidediv('basic_search');
	     	hidediv('advmod');
	     	hidediv('adveng');
	     	hidediv('advbook');
     	}
     } else if('advmod' == divid){
          stype = "advmod";
     	 if(div1.style != null){
     		 div1.style.display="";
     		 hidediv('basic_search');
	     	hidediv('advsearch');
	     	hidediv('adveng');
	     	hidediv('advbook');
     		 //if(null != iframeobj)
     		 //	iframeobj.src = '<%=basePath%>/search/dosearch.do?searchtype=advmod';
	     }else{
	     	hidediv('basic_search');
	     	hidediv('advsearch');
	     	hidediv('adveng');
	     	hidediv('advbook');
	     }
     } else if('adveng' == divid){
         stype = "adveng";
     	if(div1.style != null){
     		 div1.style.display="";
     		 hidediv('basic_search');
	     	hidediv('advmod');
	     	hidediv('advsearch');
	     	hidediv('advbook');
     		 //if(null != iframeobj)
     		 //	iframeobj.src = '<%=basePath%>/search/dosearch.do?searchtype=adveng';
     	}else{
	     	hidediv('basic_search');
	     	hidediv('advmod');
	     	hidediv('advsearch');
	     	hidediv('advbook');
     	}
     } else if('advbook' == divid){
        stype = "advbook";
     	if(div1.style != null){
     		 div1.style.display="";
     		 hidediv('basic_search');
	     	hidediv('advmod');
	     	hidediv('advsearch');
	     	hidediv('adveng');
     		 //if(null != iframeobj)
     		 //iframeobj.src = '<%=basePath%>/search/dosearch.do?searchtype=advbook';
     	}else{
     	hidediv('basic_search');
     	hidediv('advmod');
     	hidediv('advsearch');
     	hidediv('adveng');
     	}
     } 
     submitSearchForm();
    /** $(".tab span").click(function(){
 		var index = $(".tab span").index($(this));  
		$(this).siblings("span").removeClass("curr").end().addClass("curr"); 
	   	
		$(".sear").eq(index).siblings(".sear").hide().end().show();
	});
	$(".tab span").hover(function(){
		if($(this).attr("class") != "curr"){
			$(this).addClass("over");
		}
	},function(){
		 $(this).removeClass("over");
	});
	*/
     
 }
 /**
 	隐藏DIV显示
 */
 function hidediv(hidiv){
 	  var obj = document.getElementById(hidiv);
 	  if(obj.style != null)
     		 obj.style.display="none";
 }
 /**
 	获得对象
 */
 
 function ge(a){return document.getElementById(a)}
 /**
 	增加行
 */
 function AddRowEx(divid,divindex,divcount){
 	try{
		if(ge(divindex).value==ge(divcount).value){
			return
		}
		var curID=parseInt($("#"+divindex).val());
		var copyID=curID+1;
		var curTrID=divid+"_"+curID.toString();
		var copyTrID=divid+"_"+copyID.toString();
		//alert(curTrID + "," + copyTrID);
		var copyHtml="";
		if($("#"+copyTrID).html()!=null){
			$("#"+copyTrID).show()
		}else{
			var cloneObj=$("#"+curTrID).clone();
			if(curID==1){
				if(cloneObj.find("td:first")!=null){
					cloneObj.find("td:first").remove()
				}
				if(cloneObj.find("span:first")!=null){
					cloneObj.find("span:first").remove()
				}
				var logicalTd=$("#hidden_logical_"+divid).html();
				if(logicalTd!=""){
					var reg=/{key}/g;
					logicalTd=logicalTd.replace(reg,copyTrID);
					cloneObj=cloneObj.prepend(logicalTd)
				}
			}
			copyHtml=$("<div></div>").append(cloneObj).html();
			var reg1=eval("/"+curTrID+"/g");
			copyHtml=copyHtml.replace(reg1,divid+"_"+copyID.toString());
			//alert(copyHtml);
			if(copyHtml!=""){
				$("#"+curTrID).after(copyHtml)
			}
		}
		var objvalue=ge(copyTrID+"_value1");
		if(objvalue!=null){
			objvalue.value=""
		}
		objvalue=ge(copyTrID+"_value2");
		if(objvalue!=null){
			objvalue.value=""
		}
		ge(divindex).value=copyID.toString();
		var obj=ge(copyTrID+"_sel");
		if(!obj){
			obj=ge(copyTrID+"_sel1")
		}
		if(obj){
			obj.options[copyID-1].selected=true;
			obj.onchange()
		}
	}catch(e){
	}
	 
 }
 
 function resizehight(flag){
 	var dhight = parent.document.getElementById("searchindex").style.height; 
 	alert(dhight);
 	//parent.document.getElementById("searchindex").style.height = (dhight +15)px;
 }
 function DeleteRow(h,c,b){
	try{
		if(ge(c).value=="1"){
			return
		}else{
			var g=parseInt(ge(c).value);
			var f=h+"_"+g;var a=ge(f+"_value1");
			if(a!=null){
				a.value=""
			}
			a=ge(f+"_value2");
			if(a!=null){
				a.value=""
			}
			ge(f).style.display="none";
			g--;
			ge(c).value=g
		}
	}catch(d){
	return
	}
}
function resetAll(){
 	/**var   obj = window.document.all.tags("input");  
 	if(obj != null){
		for(var i=0;i <obj.length;i++){ 
		    if(obj[i].type== "text"){ 
		            obj[i].value   =   ""; 
		    } 
		}
		$(':input','#inputform')   
	.not(':button, :submit, :reset, :hidden')   
	.val('')   
	.removeAttr('checked')   
	.removeAttr('selected');  
	}*/
	
	$("input[type='text']").each(function(){ 
  		 $(this).val(""); 
	});
  //  window.parent.tagtree.clearAllSelectedItem();
    if("advsearch" == stype){
   	  advSearch('');
	   }else if("advmod" == stype){
	      advModSearch('','');
	   }else if("adveng" == stype){
	   	  advEngSearch('','');
	   }else if("advbook" == stype){
	   	  advBookSearch('','')
	   }else {
	      generalSearch('','');
	   } 
}


/**
高级检索
*/
function advSearch(datarange){
	var divid = "txt_";
	var onestr = "?searchtype=advsearch&";
	for(var i=1; i<=27; i++){
		var divcur = divid + i + "_value";
		var curobj = document.getElementById(divcur);
		var curvalueStr = divid+i+"_value";
		var curlogicStr = divid+i+"_logical";
		var curselStr = divid+i+"_sel";
		var curspecialStr = divid+i+"_special";
		
		if(curobj != undefined ){
			if(curobj.value != "")
			{
				var curvalue = curobj.value;
				if(i !=1){
					var curlogic = document.getElementById(curlogicStr).value;
				}else{
					var curlogic = 0 ;
				}
				var cursel = document.getElementById(curselStr).value;
				var curspecial = document.getElementById(curspecialStr).value;
				if(onestr.indexOf("&")!=-1){
					onestr = onestr + "&";
				}
				onestr = onestr + curvalueStr+"="+curvalue+"&"+curlogicStr+"="+curlogic+"&"+curselStr+"="+cursel+"&"+curspecialStr+"="+curspecial;
			}
		}
		
	}  
	var tags = getAllselectedId();
	if(null != tags && tags != ''){
    	var tarray = tags.split(','); 
        if(tarray != null){
        	if(tarray.length > 1000){
        		alert("最多只能选择1000个主题分类词,请删减!");
        		return;	
        	}
        }
    }
    onestr +="&datarange="+datarange+"&tags="+tags;
    //alert(onestr);
	resultform.action = "<%=basePath %>search/dosearch.do"+onestr;
 	resultform.submit();
}
/**
高级现代中文期刊检索
*/
function advModSearch(colname,ordernum){
	var divid = "mod_";
	var onestr = "?searchtype=advmod&";
	for(var i=1; i<=24; i++){
		var divcur = divid + i + "_value";
		var curobj = document.getElementById(divcur);
		var curvalueStr = divid+i+"_value";
		var curlogicStr = divid+i+"_logical";
		var curselStr = divid+i+"_sel";
		var curspecialStr = divid+i+"_special";
		
		if(curobj != undefined ){
			if(curobj.value != "")
			{
				var curvalue = curobj.value;
				if(i !=1){
					var curlogic = document.getElementById(curlogicStr).value;
				}else{
					var curlogic = 0 ;
				}
				var cursel = document.getElementById(curselStr).value;
				var curspecial = document.getElementById(curspecialStr).value;
				if(onestr.indexOf("&")!=-1){
					onestr = onestr + "&";
				}
				onestr = onestr + curvalueStr+"="+curvalue+"&"+curlogicStr+"="+curlogic+"&"+curselStr+"="+cursel+"&"+curspecialStr+"="+curspecial;
			}
		}
		
	}  
	var tags = getAllselectedId();
	if(null != tags && tags != ''){
    	var tarray = tags.split(','); 
        if(tarray != null){
        	if(tarray.length > 1000){
        		alert("最多只能选择1000个主题分类词,请删减!");
        		return;	
        	}
        }
    }
    
    var starty = document.getElementById('startyearmod').value;
    var endy = document.getElementById('endyearmod').value;
    onestr+="&startyearmod="+starty+"&endyearmod="+endy+"&tags="+tags;
    if(colname != ''){
    	onestr+="&orderName="+colname+"&orderNum="+ordernum; 
    }
    //alert(onestr);
	resultform.action = "<%=basePath %>search/dosearch.do"+onestr;
 	resultform.submit();
}
/**
高级英文期刊检索
*/
function advEngSearch(colname,ordernum){
	var divid = "eng_";
	var onestr = "?searchtype=adveng&";
	for(var i=1; i<=14; i++){
		var divcur = divid + i + "_value";
		var curobj = document.getElementById(divcur);
		var curvalueStr = divid+i+"_value";
		var curlogicStr = divid+i+"_logical";
		var curselStr = divid+i+"_sel";
		var curspecialStr = divid+i+"_special";
		
		if(curobj != undefined ){
			if(curobj.value != "")
			{
				var curvalue = curobj.value;
				if(i !=1){
					var curlogic = document.getElementById(curlogicStr).value;
				}else{
					var curlogic = 0 ;
				}
				var cursel = document.getElementById(curselStr).value;
				var curspecial = document.getElementById(curspecialStr).value;
				if(onestr.indexOf("&")!=-1){
					onestr = onestr + "&";
				}
				onestr = onestr + curvalueStr+"="+curvalue+"&"+curlogicStr+"="+curlogic+"&"+curselStr+"="+cursel+"&"+curspecialStr+"="+curspecial;
			}
		}
		
	}  
	var tags = getAllselectedId();
	if(null != tags && tags != ''){
    	var tarray = tags.split(','); 
        if(tarray != null){
        	if(tarray.length > 1000){
        		alert("最多只能选择1000个主题分类词,请删减!");
        		return;	
        	}
        }
    }
    var starty = document.getElementById('startyeareng').value;
    var endy = document.getElementById('endyeareng').value;
    onestr+="&startyeareng="+starty+"&endyeareng="+endy+"&tags="+tags;
   // alert(onestr);
   if(colname != ''){
    	onestr+="&orderName="+colname+"&orderNum="+ordernum; 
    }
	resultform.action = "<%=basePath %>search/dosearch.do"+onestr;
 	resultform.submit();
}
/**
高级古籍检索
*/
function advBookSearch(colname,ordernum){
	var divid = "book_";
	var onestr = "?searchtype=advbook&";
	for(var i=1; i<=7; i++){
		var divcur = divid + i + "_value";
		var curobj = document.getElementById(divcur);
		var curvalueStr = divid+i+"_value";
		var curlogicStr = divid+i+"_logical";
		var curselStr = divid+i+"_sel";
		var curspecialStr = divid+i+"_special";
		
		if(curobj != undefined ){
			if(curobj.value != "")
			{
				var curvalue = curobj.value;
				if(i !=1){
					var curlogic = document.getElementById(curlogicStr).value;
				}else{
					var curlogic = 0 ;
				}
				var cursel = document.getElementById(curselStr).value;
				var curspecial = document.getElementById(curspecialStr).value;
				if(onestr.indexOf("&")!=-1){
					onestr = onestr + "&";
				}
				onestr = onestr + curvalueStr+"="+curvalue+"&"+curlogicStr+"="+curlogic+"&"+curselStr+"="+cursel+"&"+curspecialStr+"="+curspecial;
			}
		}
		
	}  
	var tags = getAllselectedId();
	if(null != tags && tags != ''){
    	var tarray = tags.split(','); 
        if(tarray != null){
        	if(tarray.length > 1000){
        		alert("最多只能选择1000个主题分类词,请删减!");
        		return;	
        	}
        }
    }
    //var tcmname = document.getElementById('tcmname').value;
   // var tcmname_logic = document.getElementById('tcmname_logic').value;
    //var tcmsyn = document.getElementById('synname');
   // var synflag = '';
    //if(tcmsyn.checked)
    //	synflag = tcmsyn.value;
   // onestr +='&tcmname='+tcmname+'&tcmname_logic='+tcmname_logic+'&tcmsyn='+synflag+"&tags="+tags;
    onestr +='&tags='+tags;
    //alert(onestr);
    if(colname != ''){
    	onestr+="&orderName="+colname+"&orderNum="+ordernum; 
    }
	resultform.action = "<%=basePath %>search/dosearch.do"+onestr;
 	resultform.submit();
}
		//-->
		
</script>
<style> 
 
#tipcontain{border:1px solid #ccc; padding:20px;}
.highlight { 
   background-color:#ff0; color:#000; 
} 

</style>

</head>
<body style="overflow:auto;">
<form name="resultform" action="" method="post">

<input type="hidden" value='<%=onekeyword==null?"":onekeyword %>' name="onekeyword" id="onekeyword"/>
<input type="hidden" value='<%=onesearchinfo==null?"":onesearchinfo %>' name="onesearchinfo" id="onesearchinfo"/>

</form>
<form name="inputform">
<table width="98%" border="0" align=center cellspacing="0" cellpadding="0">
    <tr> 
        <td> 
        <div class="tab">
            	<span <%if("basic_search".equals(searchtype)){%>class="curr"<%}else{ %>class="over"<%} %>><a href="javascript:searchViewDisplay('basic_search');"  style="TEXT-DECORATION:none;">全库基本检索</a></span>
                <span <%if("advsearch".equals(searchtype)){%>class="curr"<%}else{ %>class="over"<%} %>><a href="javascript:searchViewDisplay('advsearch');" style="TEXT-DECORATION:none">全库高级检索</a></span>
                <span <%if("advmod".equals(searchtype)){%>class="curr1"<%}else{ %>class="over1"<%} %>><a href="javascript:searchViewDisplay('advmod');" style="TEXT-DECORATION:none">中文期刊检索</a></span>
                <span <%if("adveng".equals(searchtype)){%>class="curr1"<%}else{ %>class="over1"<%} %>><a href="javascript:searchViewDisplay('adveng');" style="TEXT-DECORATION:none">英文期刊检索</a></span>
                <span <%if("advbook".equals(searchtype)){%>class="curr1"<%}else{ %>class="over1"<%} %>><a href="javascript:searchViewDisplay('advbook');" style="TEXT-DECORATION:none">古籍检索</a></span>
        </div> 
        <div class="sear" id="basic_search" style="<%if("basic_search".equals(searchtype)){ %>display:block<%}else{ %>display:none<%} %>">
           
            <table width="100%" border="0" cellspacing="0" cellpadding="0">  
             <tr>
			     <td nowrap="true" width="15%" align=center>
			    		检索入口
		         </td> 
			     <td width="15%" align=center>
				     <select  name='basic_col' id='basic_col' style="width:99%"> 
				            <option value="ALL">任意字段</option>
			                <option value="TITLE">标题</option>
			                <option value="KEYWORD">关键词</option>
			                <option value="SUBJECTWORD">主题词</option>
			                <option value="ORIGINALTEXT">摘要/原文文本化</option>
			                <option value="AUTHOR">作者</option> 
			                <option value="AUTHOR">英文作者</option>
			                <option value="PERIODICALNAME">刊名</option>  
			                <option value="PERIODICALNAME">英文刊名</option>  
							<option value="BOOKNAME">书籍名称</option>
							<option value="YEARSTR">年份</option>
							<option value="BOOKCD">朝代</option>
							<!-- option value="TCMNAME">中医病名</option>
							<option value="VOLUMESECTION">卷册章节</option>
							<option value="AUTHORUNIT">作者单位</option>
							<option value="AUTHORADDRESS">作者通讯地址</option>
 							<option value="LANGUAGE">语种</option>
							<option value="DOCUMENTTYPE">文献类型</option>
							<option value="CLASSNO">分类号</option>
							<option value="FUNDSTR">资助情况</option-->
							
							<option value="PERIOD">期</option> 
							<option value="FUNDNAME">基金</option>
							<option value="FUNDTYPE">资助类别</option>
							
							<!-- option value="COMFROM">文献来源</option>
							<option value="AREASTR">国家\省市</option>
							<option value="CWNUM">参文数</option>
							<option value="PUBLISHAREA">出版地</option>
							<option value="IMPRESSWORD">特征词</option>
							<option value="USERSUBJECT">人名主题</option--> 
			          </select>
			       </td>
			      <td width="35%" >
			     	<input name="basic_colvalue" id="basic_colvalue" type="text" value="" style="width:98%"  />
			      </td>
			      <td width="10%" align=center>
				     <select id="basic_special" name="basic_special" style="width:97%">
					     <option value=0>精确</option>
					     <option value=1 selected>模糊</option>
				     </select>
			      </td> 
			      <!-- td rowspan=2  align=center nowrap>
                    <input   type="button" class="butto" onclick="generalSearch('','');" value=" 检 索 "/>
                    <input   type="button" class="butto" onclick="resetAll();" value=" 清 除 "/> 
                    <input   type="button" class="butto" onclick="generalSecondSearch('');" value="二次检索"/>
                 </td-->
			      <td   align=center nowrap>
                    <input   type="button" class="butto" onclick="generalSearch('','');" value=" 检 索 "/>
                    <input   type="button" class="butto" onclick="resetAll();" value=" 清 除 "/> 
                    <input   type="button" class="butto" onclick="generalSecondSearch('');" value="二次检索"/>
                 </td>
              </tr>
              <!-- tr>
                <td align=center>出版时间</td>
                <td><input type="text" class="Wdate" id="basic_start" value="" style="width:80%;vertical-align:middle" name="basic_start"  onFocus="WdatePicker({el:'basic_start',dateFmt:'yyyy'})"  /></td>
                <td>-<input type="text" class="Wdate" id="basic_end" value="" style="width:35%;vertical-align:middle" name="basic_end"  onFocus="WdatePicker({el:'basic_end',dateFmt:'yyyy'})"  /></td>
                <td></td>
               </tr-->
         </table> 
        </div>  
        <div class="sear" id="advsearch" style="<%if("advsearch".equals(searchtype)){ %><%}else{ %>display:none<%} %>">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">  
             <input id="txt_i" value="1" type="hidden" name="txt_i"></input>
             <input id="txt_c" value="31" type="hidden" name="txt_c"></input>
             <tr id="hidden_logical_txt" style="display:none">
                <td nowrap="true" style="width:10%;" align="right" >
                    <select id="{key}_logical" name="{key}_logical">
                        <option value="0" selected="">并且</option>
                        <option value="1">或者</option>
                    </select> 
                </td>
             </tr> 
             <tr id="txt_1">
	             <td nowrap  width="10%" align=center>
		    			<input onclick="AddRowEx('txt','txt_i','txt_c');" type="button" value="增加" class="butto"/>
		    			<input onclick="DeleteRow('txt','txt_i','txt_c');" type="button" value="删除" class="butto"/>
	             </td> 
	             <td width="15%">
		     		<select id='txt_1_sel' name='txt_1_sel' style="width:100%">
	                        <option value="TITLE">中文标题</option>
							<option value="TITLEN">英文标题</option>
							<option value="BOOKNAME">书籍名称</option> 
							<option value="VOLUMESECTION">卷册章节</option>
							<option value="ORIGINALTEXT">原文文本</option>
							<option value="PERIODICALNAME">期刊名称</option> 
							<option value="AUTHOR">作者</option>
							<option value="AUTHOREN">英文作者</option>
							<option value="AUTHORUNIT">作者单位</option>
							<option value="AUTHORADDRESS">作者通讯地址</option>
							<option value="KEYWORD">关键字</option> 
							<option value="SUBJECTWORD">中文主题词</option> 
							<option value="ABSTRACT">摘要</option> 
							<option value="LANGUAGE">语种</option>
							<option value="DOCUMENTTYPE">文献类型</option>
							<option value="CLASSNO">分类号</option>
							<option value="FUNDSTR">资助情况</option>
							<option value="YEARSTR">年份</option>
							<option value="PERIOD">期</option> 
							<option value="FUNDTYPE">资助类别</option>
							<option value="COMFROM">文献来源</option>
							<option value="AREASTR">国家\省市</option>
							<option value="CWNUM">参文数</option>
							<option value="PUBLISHAREA">出版地</option>
							<option value="IMPRESSWORD">特征词</option>
							<option value="USERSUBJECT">人名主题</option> 
			             	<option value='BOOKCD'>朝代</option>
			          </select>
	             </td>
	             <td width="60%" >
	     				<input name="txt_1_value" id="txt_1_value" type="text" value="" style="width:99%" class="sear_input"/>
	     		 </td>
	     		 <td width="15%">
				     <select id="txt_1_special" name="txt_1_special" style="width:100%">
					    <option value=0>精确</option>
					     <option value=1 selected>模糊</option>
				     </select>
	     		 </td>
	     	 </tr> 
	     	 <tr>
                 
                <td colspan=4 align=center>
                	<input name="" type="button" class="butto" onclick="advSearch('');" value=" 检 索 "/>&nbsp;
                    <input name="" type="button" class="butto" onclick="resetAll();" value=" 清 除 "/> 
                </td>
               </tr>
             
         </table> 
        </div> 
        <div class="sear" id="advmod" style="<%if("advmod".equals(searchtype)){ %><%}else{ %>display:none<%} %>">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">  
             <input id="mod_i" value="1" type="hidden" name="mod_i"></input>
             <input id="mod_c" value="22" type="hidden" name="mod_c"></input>
             <tr id="hidden_logical_mod" style="display:none">
                <td nowrap="true" style="width:10%;" align="right" >
                    <select id="{key}_logical" name="{key}_logical">
                        <option value="0" selected="">并且</option>
                        <option value="1">或者</option>
                    </select> 
                </td>
             </tr> 
             <tr id="mod_1">
	             <td nowrap  width="10%" align=center>
		    			<input onclick="AddRowEx('mod','mod_i','mod_c');" type="button" value="增加" class="butto"/>
		    			<input onclick="DeleteRow('mod','mod_i','mod_c');" type="button" value="删除" class="butto"/>
	             </td> 
	             <td width="15%">
		     		<select id='mod_1_sel' name='mod_1_sel' style="width:100%">  
		     		        <option value="TITLE">中文标题</option>
		     		        <option value="PERIODICALNAME">刊名</option>  
							<option value="AUTHOR">作者</option> 
							<option value="AUTHORUNIT">第一作者单位</option>
							<option value="AUTHORADDRESS">第一作者通讯地址</option>
							<option value="KEYWORD">中文关键字</option> 
							<option value="SUBJECTWORD">中文主题词</option>
							<option value="ABSTRACT">中文摘要</option>
							<option value="YEARSTR">年份</option>
							<option value="VOLUME">卷</option>
							<option value="PERIOD">期</option>
							<option value="PAGENO">页码</option>
							<option value="LANGUAGE">语种</option> 
							<option value="DOCUMENTTYPE">文献类型</option>
							<option value="CLASSNO">分类号</option>
							<option value="FUNDSTR">资助情况</option> 
							<option value="FUNDTYPE">资助类别</option>
							<option value="FUNDNAME">基金</option>
							<option value="COMFROM">文献来源</option>
							<option value="AREASTR">国家\省市</option>
							<option value="PUBLISHAREA">出版地</option>
							<option value="IMPRESSWORD">特征词</option>
							<option value="AUTHORABSTRACT">著者文摘</option>
							<option value="CWNUM">参文数</option>  
			          </select>
	             </td>
	             <td width="60%" >
	     				<input name="mod_1_value" id="mod_1_value" type="text" value="" style="width:99%" class="sear_input"/>
	     		 </td>
	     		 <td width="15%">
				     <select id="mod_1_special" name="mod_1_special" style="width:100%">
					     <option value=0>精确</option>
					     <option value=1 selected>模糊</option>
				     </select>
	     		 </td>
	     	 </tr> 
              <tr>
                <td align=center>出版时间</td>
                <td><input type="text" class="Wdate" id="startyearmod" value="" style="width:70%;vertical-align:middle" name="startyearmod"  onFocus="WdatePicker({el:'startyearmod',dateFmt:'yyyy'})"  /></td>
                <td>-<input type="text" class="Wdate" id="endyearmod" value="" style="width:20%;vertical-align:middle" name="endyearmod"  onFocus="WdatePicker({el:'endyearmod',dateFmt:'yyyy'})"  />
                  
                </td>
                <td>
                	<input name="" type="button" class="butto" onclick="advModSearch('','');" value=" 检 索 "/>&nbsp;
                    <input name="" type="button" class="butto" onclick="resetAll();" value=" 清 除 "/> 
                </td>
               </tr>
         </table> 
        </div> 
        <div class="sear" id="adveng" style="<%if("adveng".equals(searchtype)){ %><%}else{ %>display:none<%} %>">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">  
             <input id="eng_i" value="1" type="hidden" name="eng_i"></input>
             <input id="eng_c" value="18" type="hidden" name="eng_c"></input>
             <tr id="hidden_logical_eng" style="display:none">
                <td nowrap="true" style="width:10%;" align="right" >
                    <select id="{key}_logical" name="{key}_logical">
                        <option value="0" selected="">并且</option>
                        <option value="1">或者</option>
                    </select> 
                </td>
             </tr> 
             <tr id="eng_1">
	             <td nowrap  width="10%" align=center>
		    			<input onclick="AddRowEx('eng','eng_i','eng_c');" type="button" value="增加" class="butto"/>
		    			<input onclick="DeleteRow('eng','eng_i','eng_c');" type="button" value="删除" class="butto"/>
	             </td>  
	             <td width="15%">
		     		<select id='eng_1_sel' name='eng_1_sel' style="width:100%"> 
							<option value="TITLE">英文标题</option>
							<option value="AUTHOR">英文作者</option> 
							<option value="AUTHORADDRESS">英文作者地址</option>
							<option value="PERIODICALNAME">英文刊名</option> 
							<option value="YEARSTR">年份</option>
							<option value="VOLUME">卷</option> 
							<option value="PERIOD">期</option> 
							<option value="PAGENO">页码</option> 
							<option value="KEYWORD">英文关键字</option> 
							<option value="SUBJECTWORD">英文主题词</option> 
							<option value="ABSTRACT">英文摘要</option> 
							<option value="PUBLISHAREA">出版地</option>
							<option value="LANGUAGE">语言</option> 
							<option value="DOCUMENTTYPE">文献类型</option>  
			          </select>
	             </td>
	             <td width="60%" >
	     				<input name="eng_1_value" id="eng_1_value" type="text" value="" style="width:99%" class="sear_input"/>
	     		 </td>
	     		 <td width="15%">
				     <select id="eng_1_special" name="eng_1_special" style="width:100%">
					     <option value=0>精确</option>
					     <option value=1 selected>模糊</option>
				     </select>
	     		 </td>
	     	 </tr> 
              <tr>
                <td align=center>出版时间</td>
                <td><input type="text" class="Wdate" id="startyeareng" value="" style="width:70%;vertical-align:middle" name="startyeareng"  onFocus="WdatePicker({el:'startyeareng',dateFmt:'yyyy'})"  /></td>
                <td>-<input type="text" class="Wdate" id="endyeareng" value="" style="width:20%;vertical-align:middle" name="endyeareng"  onFocus="WdatePicker({el:'endyeareng',dateFmt:'yyyy'})"  />
                
                </td>
                <td>
                	<input name="" type="button" class="butto" onclick="advEngSearch('','');" value=" 检 索 "/>&nbsp;
                    <input name="" type="button" class="butto" onclick="resetAll();" value=" 清 除 "/> 
                </td>
               </tr>
         </table> 
        </div> 
        <div class="sear" id="advbook" style="<%if("advbook".equals(searchtype)){ %><%}else{ %>display:none<%} %>">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">  
             <input id="book_i" value="1" type="hidden" name="book_i"></input>
             <input id="book_c" value="5" type="hidden" name="book_c"></input>
             <tr id="hidden_logical_book" style="display:none">
                <td nowrap="true" style="width:10%;" align="right" >
                    <select id="{key}_logical" name="{key}_logical">
                        <option value="0" selected="">并且</option>
                        <option value="1">或者</option>
                    </select> 
                  </td>
             </tr> 
             <tr id="book_1">
	             <td nowrap  width="10%" align=center>
		    			<input onclick="AddRowEx('book','book_i','book_c');" type="button" value="增加" class="butto"/>
		    			<input onclick="DeleteRow('book','book_i','book_c');" type="button" value="删除" class="butto"/>
	              </td> 
	             <td width="15%"> 
		     		<select id='book_1_sel' name='book_1_sel' style="width:100%"> 
	                   		<option value="BOOKNAME">书籍名称</option>
	                   		<option value="TCMNAME">中医病名</option> 
	                   		<option value="AUTHOR">作者</option>
	                   		<option value='BOOKCD'>朝代</option>
							<option value="VOLUMESECTION">卷册章节</option>
							<option value="BOOKVERSION">版本</option>
							<option value="ORIGINALTEXT">原文文本化</option>  
			          </select>
	              </td>
	             <td width="60%" >
	     				<input name="book_1_value" id="book_1_value" type="text" value="" style="width:99%" class="sear_input"/>
	     		  </td>
	     		 <td width="15%">
				     <select id="book_1_special" name="book_1_special" style="width:100%">
					     <option value=0>精确</option>
					     <option value=1 selected>模糊</option>
				     </select>
	     		 </td>
	     	 </tr> 
              
               <tr> 
                <td colspan=4 align=center><input name="" type="button" class="butto" onclick="advBookSearch('','');" value=" 检 索 "/>&nbsp;
                    <input name="" type="button" class="butto" onclick="resetAll();" value=" 清 除 "/> 
                 </td>
               </tr>
         </table>  
        </div>  
       </td>  
    </tr> 
</table>
 </form>
<%if(null !=searchstrinfo && !"".equals(searchstrinfo)){ %>
 <table width="98%" align=center border="0" style="border:1px solid #bdc0c3;" cellspacing="0" cellpadding="0">
    <tr> 
    <td width="20%"> 
      <font size=3> <strong>检索式：</strong></font> 
   </td>
   <td align=left> 
       <font size=3 color=red> <strong><%=searchstrinfo %></strong></font>
   </td>
   </tr>
   </table>
   <%} %>
   <br/>
<table width="98%" align=center border="0" style="border:1px solid #bdc0c3;" cellspacing="0" cellpadding="0">
    <tr> 
        <td colspan=2> 
          <form name="searchform" action="" method=post>
          <div class="display_mode">
                <%if("basic_search".equals(searchtype)){ %>
                <span>
                <strong><font size="2">
                <input type="radio" value="0"  name="datarange" id="datarange" <%if("0".equals(datarange)){out.println(" checked");} %> onclick="filterResultBasic('0');"/>
                &nbsp;&nbsp;全部文献&nbsp;&nbsp;
                <input type="radio" value="1"  name="datarange" id="datarange" <%if("1".equals(datarange)){out.println(" checked");} %>  onclick="filterResultBasic('1');"/>
                &nbsp;&nbsp;中文期刊&nbsp;&nbsp;
                <input type="radio" value="2"  name="datarange" id="datarange" <%if("2".equals(datarange)){out.println(" checked");} %>  onclick="filterResultBasic('2');"/>
                &nbsp;&nbsp;英文期刊&nbsp;&nbsp;
                <input type="radio" value="3"  name="datarange" id="datarange" <%if("3".equals(datarange)){out.println(" checked");} %>  onclick="filterResultBasic('3');"/>
                &nbsp;&nbsp;古代文献&nbsp;</font></strong>
                </span>
                <%} %>
                <%if("advsearch".equals(searchtype)){ %>
                <span>
                <strong><font size="2">
                <input type="radio" value="0"  name="datarange" id="datarange" <%if("0".equals(datarange)){out.println(" checked");} %> onclick="filterResult('0');"/>
                &nbsp;&nbsp;全部文献&nbsp;&nbsp;
                <input type="radio" value="1"  name="datarange" id="datarange" <%if("1".equals(datarange)){out.println(" checked");} %>  onclick="filterResult('1');"/>
                &nbsp;&nbsp;中文期刊&nbsp;&nbsp;
                <input type="radio" value="2"  name="datarange" id="datarange" <%if("2".equals(datarange)){out.println(" checked");} %>  onclick="filterResult('2');"/>
                &nbsp;&nbsp;英文期刊&nbsp;&nbsp;
                <input type="radio" value="3"  name="datarange" id="datarange" <%if("3".equals(datarange)){out.println(" checked");} %>  onclick="filterResult('3');"/>
                &nbsp;&nbsp;古代文献&nbsp;</font></strong>
                </span>
                <%} %>
                 
                <%if("advmod".equals(searchtype)||"adveng".equals(searchtype)){ %>
                <b><font color=red size=3>排序方式：</font>
                <a href="javaScript:orderResult('a.title','<%if("1".equals(orderNum)){out.print("2");}else if("2".equals(orderNum)){out.print("1");} else {out.print("1");}%>')";>题名<%if("2".equals(orderNum)&&"a.title".equals(orderName)){%><img src="<%=basePath %>/app/images/arrow_up.gif"><%}else{ %><img src="<%=basePath %>/app/images/arrow_down.gif"><%} %></a>&nbsp;&nbsp;
                <a href="javaScript:orderResult('a.PERIODICALNAME','<%if("1".equals(orderNum)){out.print("2");}else if("2".equals(orderNum)){out.print("1");} else {out.print("1");}%>')";>刊名<%if("2".equals(orderNum)&&"a.PERIODICALNAME".equals(orderName)){%><img src="<%=basePath %>/app/images/arrow_up.gif"><%}else{ %><img src="<%=basePath %>/app/images/arrow_down.gif"><%} %></a>&nbsp;&nbsp;
                <a href="javaScript:orderResult('a.YEARSTR','<%if("1".equals(orderNum)){out.print("2");}else if("2".equals(orderNum)){out.print("1");} else {out.print("1");}%>')";>出版时间<%if("2".equals(orderNum)&&"a.YEARSTR".equals(orderName)){%><img src="<%=basePath %>/app/images/arrow_up.gif"><%}else{ %><img src="<%=basePath %>/app/images/arrow_down.gif"><%} %></a>&nbsp;&nbsp;
                </b>
                
                <%} %>
                 <%if("advbook".equals(searchtype)){ %>
                <b><font color=red size=3>排序方式：</font>
                <a href="javaScript:orderResult('a.bookname','<%if("1".equals(orderNum)){out.print("2");}else if("2".equals(orderNum)){out.print("1");} else {out.print("1");}%>')";>书名<%if("2".equals(orderNum)&&"a.bookname".equals(orderName)){%><img src="<%=basePath %>/app/images/arrow_up.gif"><%}else{ %><img src="<%=basePath %>/app/images/arrow_down.gif"><%} %></a>&nbsp;&nbsp;
                <a href="javaScript:orderResult('a.bookcd','<%if("1".equals(orderNum)){out.print("2");}else if("2".equals(orderNum)){out.print("1");} else {out.print("1");}%>')";>朝代<%if("2".equals(orderNum)&&"a.bookcd".equals(orderName)){%><img src="<%=basePath %>/app/images/arrow_up.gif"><%}else{ %><img src="<%=basePath %>/app/images/arrow_down.gif"><%} %></a>&nbsp;&nbsp;
                 </b>
                 
                <%} %>
           </div>
           <input type="hidden"  value="<%=onesql %>" name="onesql" id="onesql"/> 
           <input type="hidden"  value="<%=tags==null?"":tags %>" name="tags" id="tags"/> 
           <input type="hidden"  value="<%=searchtype %>" name="searchtype" id="searchtype"/> 
           <input type="hidden"  value="<%=paramstr==null?"":paramstr %>" name="paramstr" id="paramstr"/>   
          </form>
          <div id="contentarea">
          <form name="dataform" action="<%=basePath %>data/exportAllData.do" method=post>  
          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="summary">
           <% if(null != datalist && datalist.size()>0){
                int counter = 0;
      		    for(int i =0;i<datalist.size();i++){
      			    Map dm = (Map)datalist.get(i);
      			    String type = dm.get("DATATYPE")+"";
      			    counter++; 
          %> 
          <tr>
            <th colspan="2" style='word-break:break-all'> <input type="checkbox" name="paperid" id="paperid" value="<%=dm.get("ID")%>"/>
                 <%=(pagecountInt*(pagenumInt-1))+i+1 %>&nbsp;&nbsp;&nbsp;
                  <%if("1".equals(type)||"2".equals(type)){
                                   String title = (String)dm.get("TITLE");
                                   String temp = title.length()>80?title.substring(0,80)+"...":title;
                  				   out.print("<a  href=javaScript:openwindow(\"");
                  				   out.print(basePath);
                  				   out.print("search/viewdetail.do?pid="+ dm.get("ID") );
                  				   out.print("\",'800','600',''); ><span title='"+title+"'><font color=\"#BF0060\">");
                                   out.print(temp);
                                
                                    out.print("</font>"); 
                                     out.print(" </span>");
                                   //out.println("("+dm.get("YEARSTR")+")-");
                                   out.print("</a>"); 
                                   }
                              else if("3".equals(type)){
                              		 out.print("<a href=javaScript:openwindow(\"");
                  				    out.print(basePath);
                  				    out.print("search/viewdetail.do?pid="+ dm.get("ID") );
                                    out.print("\",'800','600',''); title='"+dm.get("BOOKNAME")+"'><font color=\"#796400\">");
                              		out.print(dm.get("BOOKNAME")); 
                                    out.print("</font>");  
                                     out.print("</a>");
                              }%> 
               <%if("1".equals(dm.get("ISIMG")+"")){ %>
                <input onclick="downloadpdf('<%=dm.get("ID") %>');" type="button" value="原文下载" class="origi" />
                <%}%></th>
          </tr>
          <tr>
            <td colspan="2" class="ml_45" align=left>
            <table width="97%" border="0" cellspacing="0" cellpadding="0">
            <%if("1".equals(type)){ %> 
           
                 <tr>
	                <td><b><font color=#8FBC8F>刊名:</font></b></td>
	                <td><%=StringUtilTool.NULL2Blank((String)dm.get("PERIODICALNAME")) %></td>
	              </tr>
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>作者:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("AUTHOR")) %></td>
	              </tr>
	               <tr>
	                <td><b><font color=#8FBC8F>第一作者单位:</font></b></td>
	                <td><%=StringUtilTool.NULL2Blank((String)dm.get("AUTHORUNIT")) %></td>
	              </tr>
                  <tr>
	                <td width="100"><b><font color=#8FBC8F>中文关键词:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("KEYWORD")) %></td>
	              </tr>
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>中文主题词:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("SUBJECTWORD")) %></td>
	              </tr>
	               <tr>
	                <td><b><font color=#8FBC8F>摘要:</font></b></td>
	                <td> 
	                <%
	                String abstr = StringUtilTool.NULL2Blank((String)dm.get("ABSTRACT"));
	                if(abstr.length()>300){
	                	out.println(abstr.substring(0,300));
	                	out.println("...");
	                }else{
	                	out.println(abstr);
	                } 
	                 %>
	                </td>
	              </tr> 
	               <tr>
	                <td width="100"><b><font color=#8FBC8F>年份/卷/期/页码:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("YEARSTR")) %>-<%=StringUtilTool.NULL2Blank((String)dm.get("VOLUME")) %>-<%= StringUtilTool.NULL2Blank((String)dm.get("PERIOD"))%>-<%=StringUtilTool.NULL2Blank((String)dm.get("PAGENO")) %></td>
	              </tr> 
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>基金:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("FUNDNAME")) %></td>
	              </tr> 
	               <%}else if("2".equals(type)) {%>  
	               
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>英文作者:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("AUTHOR")) %></td>
	              </tr>
	              <tr>
	                <td><b><font color=#8FBC8F>英文作者地址:</font></b></td>
	                <td><%=StringUtilTool.NULL2Blank((String)dm.get("AUTHORADDRESS")) %></td>
	              </tr>
	               <tr>
	                <td width="100"><b><font color=#8FBC8F>英文刊名:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("PERIODICALNAME")) %></td>
	              </tr>
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>年份/卷/期/页码:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("YEARSTR")) %>-<%=StringUtilTool.NULL2Blank((String)dm.get("VOLUME")) %>-<%= StringUtilTool.NULL2Blank((String)dm.get("PERIOD"))%>-<%=StringUtilTool.NULL2Blank((String)dm.get("PAGENO")) %></td>
	              </tr>
                   <tr>
	                <td width="100"><b><font color=#8FBC8F>英文关键词:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("KEYWORD")) %></td>
	              </tr>
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>英文主题词:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("SUBJECTWORD")) %></td>
	              </tr> 
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>英文摘要:</font></b></td>
	                <td > <%
	                String abstr = StringUtilTool.NULL2Blank((String)dm.get("ABSTRACT"));
	                if(abstr.length()>300){
	                	out.println(abstr.substring(0,300));
	                	out.println("...");
	                }else{
	                	out.println(abstr);
	                }
	                
	                 %></td>
	              </tr>
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>出版地:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("PUBLISHAREA")) %></td>
	              </tr>
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>文献类型:</font></b></td>
	                <td ><%=StringUtilTool.NULL2Blank((String)dm.get("DOCUMENTTYPE")) %></td>
	              </tr> 
	               <%}else if("3".equals(type)) {%>
	              
	               <tr>
	                <td width="100"><b><font color=#8FBC8F>作者:</font></b></td>
	                <td><%=StringUtilTool.NULL2Blank((String)dm.get("AUTHOR")) %></td>
	              </tr>
	               <tr>
	                <td width="100"><b><font color=#8FBC8F>朝代:</font></b></td>
	                <td><%=StringUtilTool.NULL2Blank((String)dm.get("BOOKCD")) %></td>
	              </tr>
	               <tr>
	                <td width="100"><b><font color=#8FBC8F>中医病名:</font></b></td>
	                <td><%=StringUtilTool.NULL2Blank((String)dm.get("TCMNAME")) %></td>
	              </tr>
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>卷册章节:</font></b></td>
	                <td><%=StringUtilTool.NULL2Blank((String)dm.get("VOLUMESECTION")) %></td>
	              </tr>
	              <tr>
	                <td width="100"><b><font color=#8FBC8F>版本:</font></b></td>
	                <td><%=StringUtilTool.NULL2Blank((String)dm.get("BOOKVERSION")) %></td>
	              </tr> 
	              <tr>
	                <td><b><font color=#8FBC8F>原文文本化:</font></b></td>
	                <td> <%
	                String abstr = StringUtilTool.NULL2Blank((String)dm.get("ORIGINALTEXT"));
	                if(abstr.length()>300){
	                	out.println(abstr.substring(0,300));
	                	out.println("...");
	                }else{
	                	out.println(abstr);
	                }
	                
	                 %></td>
	              </tr> 
	              <%} %>
            </table>
            
            
            </td>
          </tr> 
          <%}}else{ %>
          <tr>
            <td colspan="2" align="center" class="ml_45">
	             <font color=red size=5>没有符合查询条件的结果!</font>
	        </td>
          </tr>  
          <%} %>
        </table>  
        </form>
         </div>
        <div class="page">
            <p>
                <%=pageStr%>
            </p>
            <input onclick="selectAll(true,'paperid');" type="button" value="全选" class="all_s"/>
            <input onclick="selectAll(false,'paperid');" type="button" value="清除" class="clear"/>
            <input onclick="exportData();" type="button" value="导出" class="saver"/>
        </div>
        </td>
    </tr>
</table>
 
 
</body>
</html>
<script language=javascript>
var MS = "IE";
if(navigator.userAgent.indexOf("Firefox") > 0) {
    MS = "FF";
}
</script>

<script> 
function getAllselectedId() {  

     var selectedList = window.parent.tagtree.getAllselectedId();  
    return selectedList;
    
} 
var stype = "<%=searchtype%>";
function submitSearchForm(){
   
   if("advsearch" == stype){
   	  advSearch('');
   }else if("advmod" == stype){
      advModSearch('','');
   }else if("adveng" == stype){
   	  advEngSearch('','');
   }else if("advbook" == stype){
   	  advBookSearch('','')
   }else {
      generalSearch('','');
   } 
}
//var divH = window.screen.availHeight*0.80;
//document.getElementById("treeboxbox_tree").style.height = divH; 
// alert(document.getElementById("treeboxbox_tree").style.height);
  // alert(window.screen.availHeight);
  AddRowEx('txt','txt_i','txt_c');
  AddRowEx('txt','txt_i','txt_c'); 
  AddRowEx('mod','mod_i','mod_c');
  AddRowEx('mod','mod_i','mod_c');
  AddRowEx('eng','eng_i','eng_c');
  AddRowEx('eng','eng_i','eng_c');
  AddRowEx('book','book_i','book_c');
  AddRowEx('book','book_i','book_c'); 
  
  <%if(null != keyword && !"".equals(keyword)){%>
  	 var divObj=document.getElementById("contentarea"); 
  	 MarkHighLight(divObj,"<%=keyword%>"); 
  <%}%>
 </script>

